<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="lib/axios.min.js"></script>
</head>
<body>
<script>
    axios.defaults.baseURL='http://localhost:3000'
    async function queryData() {
        var ret=await axios.get('fdata')
        return  ret.data
    }
    queryData().then(function (data) {
        console.log(data)
    })

    async function query() {
        var ret= await new Promise(function (resolve, reject) {
            setTimeout(function () {
                resolve('nihao')
            },1000)
        })
        return ret
    }
    query().then(function (data) {
        console.log(data)
    })
</script>
</body>
</html>
